import React, { PropTypes } from 'react';
import TweenOne from 'rc-tween-one';

import {Icon, Switch, Popover, Table, Button,Select, Modal, InputNumber, Form, Input, message,Radio, Row, Col, DatePicker, Cascader,Upload,} from 'antd';
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
const Option = Select.Option;

import '../../less/info.less';

import { connect } from 'react-redux';
import { closeMask } from '../../../action/mask';

const areaData = [{
  value: 'shanghai',
  label: '上海',
  children: [{
    value: 'shanghaishi',
    label: '上海市',
    children: [{
      value: 'pudongxinqu',
      label: '浦东新区',
    }],
  }],
}];

class AddCity extends React.Component {

  constructor(props){
    super(props);
    this.state = {

    }
  }

  componentDidMount(){

  }

  handleUpload(){

  }

  render() {
    const { getFieldProps } = this.props.form;
    return (
      <div className="formContainer" form={this.props.form} style={{width:700}}>
        <div className="fromHead">
          <span className="title">编辑信息</span>
          <span className="option">
            <span>清空</span>
            <span>保存</span>
            <span onClick={()=>{
              this.props.closeMask();
            }}>关闭</span>
          </span>
        </div>
        <Form horizontal className="ant-advanced-search-formT">
          <Row gutter={16}>
            <Col sm={24}>
              <FormItem
                label="城市"
                labelCol={{ span: 10 }}
                wrapperCol={{ span: 14 }}
              >
                <Input placeholder="请输入城市" size="default" />
              </FormItem>
              <FormItem
                label="上级"
                labelCol={{ span: 10 }}
                wrapperCol={{ span: 14 }}
              >
                <Input placeholder="请选择上级" size="default" addonAfter={<span>点击选择</span>}/>
              </FormItem>
              <FormItem
                label="地址"
                labelCol={{ span: 10 }}
                wrapperCol={{ span: 14 }}
              >
                <Input placeholder="请输入地址" size="default" />
              </FormItem>
              <FormItem
                label="排序"
                labelCol={{ span: 10 }}
                wrapperCol={{ span: 14 }}
              >
                <InputNumber placeholder="请输入地址" size="default" />
              </FormItem>
            </Col>
          </Row>
        </Form>
      </div>
    )
  }
}

AddCity = Form.create()(AddCity);

const mapStateToProps = (state) => {
  return {
    maskStatus: state.mask.maskStatus
  }
}

export default connect(
  mapStateToProps,
  { closeMask }
)(AddCity)
